<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <?php include_stylesheets() ?>
  <?php include_javascripts() ?>
  <style>
  html, body { overflow:hidden; }
  </style>
</head>
<body>
<script>
<!--
function editLogo()
{
    $('#logo').css('display', 'none');
    $('#uploadLogoForm').css('display', '');
}
function submitLogo()
{
    document.getElementById('uploadLogoForm').submit();
}
-->
</script>

<div class="fss_img_upload">
  <table class="editor" id="logo"<?php if (!$has_logo) echo ' style="display: none;"' ?>>
    <tr>
      <td>
      <div class="logo_edit_wrapper">
        <img width="110" height="80" src="<?php echo url_for('@logo?mode=logo&uid='.uniqid().'&for='.$sf_request->getParameter('for')) ?>"/>
        <?php if ($error && $has_logo) echo $error.'<br />';?>
        <a href="javascript:void(0)" class="vtns_button edit_logo" onClick="editLogo()"<?php if (!$has_logo) echo ' style="display: none;"' ?>>
            <div class="FB_img_edit"></div>
            <span class="edit_text"><?php  echo __('Edit') ?></span>
        </a>
        <div class="clearfix"></div>
      </div>
      </td>
    </tr>
  </table>
  <form id="uploadLogoForm" enctype="multipart/form-data" action="<?php echo url_for('@logo', true).'?for='.$sf_request->getParameter('for') ?>" method="post"<?php if ($has_logo) echo ' style="display: none;"' ?> >
      <?php if ($error && !$has_logo) echo $error;?>
      <input type="file" id="file" name="file" class="inputtext" onchange="submitLogo()"/>
  </form>
</div>
</body>
</html>
